package cn.com.manager.listener;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by Administrator on 2016/4/13.
 */
public class MySessionListener implements SessionListener{
    private static final Logger logger = LoggerFactory.getLogger(MySessionListener.class);
    @Override
    public void onStart(Session session) {
        logger.debug("Class----<<{}>>,Info----<<监听会话创建，sessionId={}>>",MySessionListener.class.getName(),session.getId());
    }

    @Override
    public void onStop(Session session) {
        logger.debug("Class----<<{}>>,Info----<<监听会话停止，sessionId={}>>",MySessionListener.class.getName(),session.getId());
    }

    @Override
    public void onExpiration(Session session) {
        logger.debug("Class----<<{}>>,Info----<<监听会话过期，sessionId={}>>",MySessionListener.class.getName(),session.getId());
    }
}
